package com.wing.res.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.wing.mybatis.common.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @version 1.1.0
 * @Author hz
 * @Date 2024-09-19 15:15
 **/

@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("res_pro_task")
public class ResProTask implements Serializable {
    private static final long serialVersionUID = 1L;

    //任务编号
    private String taskNo;

    //客户id
    private Long customerId;

    //订单id
    private Long orderId;

    //客户产品id
    private Long cusProId;

    //状态 1.待规划 2.工程规划 3.定型
    private String status;

    //订单来源 1.客户订单 2.自研产品
    private String source;

    //计划交货时间
    private LocalDateTime planGivenTime;

    //skuid
    private Long skuId;

    //外部产品id
    private Long extProductId;

    //skuCode
    private String skuCode;

    //是否已经bom规划
    private String isBom;

    //是否已经工艺规划
    private String isCraftsmanship;

    /**
     * ID
     *
     */
    @JsonSerialize(using= ToStringSerializer.class)
    @TableId(type = IdType.AUTO)
    public Long id;

    /**
     * 版本号
     *
     */
    @Version
    @JsonIgnore
    protected Long version;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    protected LocalDateTime createTime;

    /**
     * 创建者ID
     */
    private Long creator;

    /**
     * 任务id
     */
    private Long cusProUnitId;

    /**
     * 创建者名称
     */
    private String creatorName;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonIgnore
    protected LocalDateTime updateTime;

    /**
     * 修改者
     */
    protected Long modifier;

    /**
     * 修改者名称
     */
    private String modifierName;

    /**
     * 是否已删除
     */
    protected Boolean isDeleted;

    /**
     * 备注
     */
    protected String remark;


    /**
     * 自研附件信息
     */
    private Long zyEnclosureId;


    /**
     * 评审任务id
     */
    private String reviewCode;

    /**
     * 校对时间
     */
    private LocalDateTime proofreadTime;

    /**
     * 审核时间
     */
    private LocalDateTime auditTime;

    /***
     * 校对人
     */
    private String proofreadName;

    /**
     * 审核人
     */
    private String auditName;

}
